package com.deer.wms.ASN.manage.dao;

import com.deer.wms.ASN.manage.model.in.AcceptRecord;
import com.deer.wms.ASN.manage.model.in.AcceptRecordCriteria;
import com.deer.wms.ASN.manage.model.qc.QcRecordCriteria;
import com.deer.wms.ASN.manage.model.qc.QcRecordDto;
import com.deer.wms.project.root.mapper.SuperMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author guo
 */
public interface AcceptRecordMapper extends SuperMapper<AcceptRecord> {

    /**
     * 根据条件查询收货单
     *
     * @param criteria 查询条件
     * @return List<AcceptRecord>
     */
    List<AcceptRecord> findList(AcceptRecordCriteria criteria);

    List<AcceptRecord> findCanTongbu();

    List<AcceptRecord> findDayList(AcceptRecordCriteria criteria);

    Integer getNextBoxCode();

    void updateQcState(String acceptRecordCode, int qcState);

    void updateAllQcState(String asnBillNo, int qcState);

    List<AcceptRecord> findBillNo(String toBoxCode);

    Map<String, Object> findByCode(String code);

    AcceptRecord getAsnDetailNo(@Param("billNo") String billNo, @Param("detailNo") String detailNo);

    /**
     * 找到待拆分的收货单
     * @param criteria 查询条件
     * @return List<AcceptRecord>
     */
    List<AcceptRecord> findPackList(AcceptRecordCriteria criteria);
}
